<template>
  <div>
    <h3>Welcome</h3>
    <el-card style="text-align: center">
      <el-button size="medium" type="success" @click="clickEvent" :loading="isloading" :round="true">
        开始捕获
      </el-button>
    </el-card>
  </div>
</template>

<script>
export default {
  name: 'Welcome',
  data(){
    return{
      isloading:false,
    }
  },
  methods:{
    async clickEvent(){
      let res = await this.$http.get('/zz/startCap')
      if (res.data.status !== 200) return this.$message.error('捕获失败')
      this.isloading = true
      this.$message.success("已经开始捕获...")
    }
  }
}
</script>

<style scoped>

</style>
